﻿#include "mainwindow.h"
#include "ui_mainwindow.h"
#include  "detail.h"
#include "common.h"

MainWindow::MainWindow(QWidget *parent) :
    QMainWindow(parent),
    ui(new Ui::MainWindow)
{
    ui->setupUi(this);

    ui->mainToolBar->hide();
}

MainWindow::~MainWindow()
{
    delete ui;
}

//
void MainWindow::on_actionAdd_triggered()
{
#if FakeData
    QListWidgetItem* item = new QListWidgetItem("Text");
    item->setSizeHint(QSize(ui->listWidget->width()-5,30));
    ui->listWidget->addItem(item);
#else
    Detail * detail = new Detail();
    detail->show();
#endif
}

void MainWindow::on_actionQuit_triggered()
{
    qApp->quit();
}
